package com.xk857.enums;

/**
 * 规范接口返回值内容
 * @author cv大魔王
 * @version 1.0
 * @date 2021/7/24 18:54
 */
public enum ResultEnum {

    SUCCESS(20000, "成功"),

    SEND_SUCCESS(20000, "发送成功"),

    UPDATE_PASSWORD_SUCCESS(20000, "密码修改成功"),

    DELETE_SUCCESS(20000, "删除成功"),

    JOIN_SUCCESS(20000, "加入成功"),

    UPLOAD_SUCCESS(20000, "上传成功"),

    REGISTER_SUCCESS(20000, "注册成功"),

    LOGIN_ERROR(20001, "请登录"),

    ROLE_ERROR(20002, "权限不足"),

    MENU_ERROR(20003, "权限不足"),

    DUPLICATE_ACCOUNT(20004, "您的手机号已经注册"),

    NO_REGISTER(20004, "请先注册"),

    VERIFICATION_CODE_ERROR(20005, "验证码有误"),

    DELETE_ERROR(20006, "删除失败"),

    UPLOAD_ERROR(20000, "上传失败"),

    REGISTER_CODE_ERROR(20010, "您的短信已发送，5分钟内均可使用"),

    VALID_ERROR(50001, "参数有误"),

    RUNTIME_ERROR(50002, "运行异常"),

    ERROR(50000, "异常");

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
